package testview.zhen.com.myapplication.material_design

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.LayoutInflater
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import testview.zhen.com.myapplication.databinding.ActivityCollapsingToolbarBinding

class CollapsingToolbarActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
       val binding = ActivityCollapsingToolbarBinding.inflate(LayoutInflater.from(this))
        setContentView(binding.root)
        val array = ArrayList<String>()
        for (i in 0..60){
            array.add("小明${i}")
        }
        val l = LinearLayoutManager(this)
        l.orientation = RecyclerView.VERTICAL
        binding.recycleView.layoutManager = l
        val s = SampleAdapter(this)
        s.setData(array)
        binding.recycleView.adapter = s
    }
}
